﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace WebsiteAdmin.Wilson.ProInfo
{
    public partial class CatList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                BindCat(Global.ConnWilson);
            }
        }

        private void BindCat(string strCon) 
        {
            using (DataTable dtCat = Bll.Category.MULTIPLE(strCon))
            {
                if (dtCat != null && dtCat.Rows.Count > 0) 
                {
                    this.RP_Cat.DataSource = dtCat.DefaultView;
                    this.RP_Cat.DataBind();
                }
            }
        }
    }
}
